package com.ddc.study.feature.collect.website;

import com.ddc.study.base.BasePresenter;
import com.ddc.study.base.BaseView;
import com.ddc.study.entity.CollectWebsite;

import java.util.List;

import androidx.annotation.Nullable;

/**
 * Created on 2018/6/7.
 *
 * @author lshun
 * @version 1.0
 */
interface CollectWebsiteContract {
    interface IModel {
    }

    interface IView extends BaseView {
        void showData(@Nullable List<CollectWebsite> data);

        void showAddCollectLinkResult(@Nullable CollectWebsite collectWebsite);

        void showEditCollectLinkResult(@Nullable CollectWebsite collectWebsite);

        void showDeleteLinkResult(boolean result, int id);
    }

    abstract class IPresenter extends BasePresenter<IView> {
        abstract void loadData();

        abstract void collectLink(String name, String link);

        abstract void editCollectLink(int id, String name, String link);

        abstract void deleteLink(int id);
    }
}
